#pragma once
#include "RBTree.h"

namespace xy {
	template<class K>
	class set {
		struct SetKeyofT {
			const K& operator()(const K& kof) {
				return kof;
			}
		};

	public:
		typedef RBTree<K, K, SetKeyofT> tree;
		typedef typename tree::const_iterator iterator;
		typedef typename tree::const_iterator const_iterator;
		pair<iterator, bool> insert(const K& data) {
			pair<typename tree::iterator, bool> ret = _t.insert(data);
			return pair<iterator, bool>(ret.first, ret.second);
		}

		const_iterator begin() const{
			return _t.begin();
		}

		const_iterator end() const{
			return _t.end();
		}
	private:
		tree _t;
	};
}